package gat.common.enums;

import com.fasterxml.jackson.annotation.JsonCreator;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @Author
 * @Date 2022/5/10
 * @Version 1.0
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum CooperationTemplateEnums {

    advertisementPartyA("HZ20220726142505482001", "广告甲方"),

    trafficPartyB("HZ20220726142552900002", "流量乙方"),

    overseasBusiness("HZ20220726142611907001", "海外业务"),

    qualityProduct("HZ20220726142638154002", "优质货源"),

    salesChannel("HZ20220726142730346001", "销售渠道"),

    resourceExchange("HZ20220726142826294001", "资源互换"),

    flowSwap("HZ20220726142844383002", "流量互换"),

    merchantsToJoin("HZ20220726143003378001", "招商加盟"),

    ;



    private String code;

    private String name;

    @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
    public static CooperationTemplateEnums getByTemplateCode(String code) {
        for (CooperationTemplateEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

}
